<template>
  <div class="loading-container">
    <div class="spinner"></div>
    <p class="loading-text">加载中...</p>
  </div>
</template>

<script setup>
// 主题功能
import { inject, ref } from "vue";
const theme = inject("theme", ref("light"));
</script>

<style scoped>
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: background-color 0.3s, color 0.3s;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

.loading-text {
  font-size: 16px;
  color: var(--secondary-color);
  user-select: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
</style>
